/**
 * 
 */
package com.thor.palmmall.rest.tenant.converter;

import org.springframework.core.convert.converter.Converter;

import com.thor.palmmall.rest.tenant.ALogo;
import com.thor.palmmall.spi.tenant.SLogo;

/**
 * @author NuoSa
 *
 * @since 1.0
 */
public class SLogosConverter implements Converter<ALogo, SLogo> {
  public static SLogosConverter getInstance() {
    if (instance == null)
      instance = new SLogosConverter();
    return instance;
  }

  private static SLogosConverter instance;

  private SLogosConverter() {
  }

  @Override
  public SLogo convert(ALogo source) {
    if (source == null) {
      return null;
    }
    SLogo target = new SLogo();
    target.setCaption(source.getCaption());
    target.setId(source.getId());
    target.setName(source.getName());
    return target;
  }

}
